<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script src="./js/vue.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/vuex/3.2.0/vuex.min.js"></script>
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <div :style="{'color':color,'fontSize':fontSize+'px'}">文本</div>
      <div :style="styles">对象</div>
    </div>
  </body>
  <script>
    var app = new Vue({
      el: "#app",
      data: {
        color: "red",
        fontSize: 18,

        styles: {
          color: "blue",
          fontSize: 30 + "px",
          fontWeight: "bolder"
        }
      }
    })
  </script>
  <!-- 注意：

    1、:class可以与class共存
    2、当:class的表达式过长或逻辑复杂时，还可以绑定一个计算属性，
       一般当条件多于两个时，都可以使用data或computed
--></html>
